package com.aizhixin.test.question.controller;

import java.util.List;

import org.aspectj.apache.bcel.classfile.Module.Require;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import org.springframework.http.MediaType;

import com.aizhixin.test.question.dto.AllAnswerRecordDTO;
import com.aizhixin.test.question.service.AllAnserService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;

@RestController
@RequestMapping(value="/v1/open/allAnserRecord")
@Api(tags="答题汇总API")
@Slf4j
public class AllAnserRecordController {
	@Autowired
	private AllAnserService allAnserService;
	@GetMapping(value="/{userId}",produces=MediaType.APPLICATION_JSON_VALUE)
	@ApiOperation(httpMethod="GET",value="查看答题汇总",notes="查看答题汇总<br><br><b>@author xixi</b>")
	public List<AllAnswerRecordDTO> selectAllRecord(
			@ApiParam(value="用户ID",required = true)
			@PathVariable Long userId){
				return allAnserService.getAllAnserRecordByUserId(userId);
		
	}

}	
	

